package org.skywind.tools;

import java.io.BufferedInputStream;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.lang.reflect.Method;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;

import org.htmlparser.Parser;
import org.htmlparser.util.NodeIterator;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;

public class test {
	public static void main(String[] args) throws Exception {
//		System.out.println(test.class.getMethods()[0].getParameterTypes()[0].getCanonicalName());
//		Class.forName(Integer.class.getCanonicalName());
		Method[] methods = test.class.getMethods();
		for(Method method:methods){
			System.out.println(method);
		}
//		System.out.println(int.class.);
//		System.out.println(300000);
//		String xml = "<html>ss<body id='ddd'>kk</body></html>";
//		Document doc =DOMUtil.loadXML(new ByteArrayInputStream(xml.getBytes()));
//		
//		System.out.println(doc.getChildNodes().item(0).getTextContent());
//		URL url = new URL("http://localhost:8080/SearchEngine/s?type=web&key=java%20&page=1&pageSize=5");
//		System.out.println("getAuthority : "+url.getAuthority());
//		System.out.println("getFile : "+url.getFile());
//		System.out.println("getDefaultPort : "+url.getDefaultPort());
//		System.out.println("getHost : "+url.getHost());
//		System.out.println("getPort : "+url.getPort());
//		System.out.println("getPath : "+url.getPath());
//		System.out.println("getProtocol : "+url.getProtocol());
//		System.out.println("getQuery : "+url.getQuery());
//		System.out.println("getRef : "+url.getRef());
//		System.out.println("getUserInfo : "+url.getUserInfo());
//		System.out.println("getContent : "+url.getContent());
//		System.out.println("boolean : "+Boolean.valueOf("ok"));
//		Parser parser = new Parser();
//		parser.setURL("http://localhost:8080/");
//		System.out.println(parser.getLexer().getPage().getAbsoluteURL("abc/ddd.html"));
//		String [] list = "\"5866-1184898012000\"".split("\"");
//		for(String var:list){
//			System.out.println(var);
//		}
//		Parser parser = new Parser();
//		URL url = new URL("http://localhost:8080/");
//		URLConnection urlc = url.openConnection();
//		urlc.connect();
//
//		parser.setConnection(urlc);
//		NodeIterator ni = parser.elements();
//		while(ni.hasMoreNodes()){
//			System.out.println(ni.nextNode());
//		}
	}
	public void ddd(){
		
	}
	public void eeee(){
		
	}
	public void hhhh(){
		
	}
}
